package com.gedi.consumer.client;

/**
 * @Author:RenPu
 * @Date: 2020/7/6 17:45
 * @Version: 1.0
 * @description:
 */
public class EnumTest {

    Day day;

    public EnumTest(Day day) {
        this.day = day;
    }

    public void tellItLikeItIs() {
        switch (day) {
            case MONDAY:
                System.out.println(day.getName()+day.getValue());
                break;

            case FRIDAY:
                System.out.println(day.getName()+day.getValue());
                break;

            case SATURDAY: case SUNDAY:
                System.out.println(day.getName()+day.getValue());
                break;

            default:
                System.out.println(day.getName()+day.getValue());
                break;
        }
    }

    public static void main(String[] args) {
        EnumTest firstDay = new EnumTest(Day.MONDAY);
        firstDay.tellItLikeItIs();
//        EnumTest thirdDay = new EnumTest(Day.WEDNESDAY);
//        thirdDay.tellItLikeItIs();
//        EnumTest fifthDay = new EnumTest(Day.FRIDAY);
//        fifthDay.tellItLikeItIs();
//        EnumTest sixthDay = new EnumTest(Day.SATURDAY);
//        sixthDay.tellItLikeItIs();
//        EnumTest seventhDay = new EnumTest(Day.SUNDAY);
//        seventhDay.tellItLikeItIs();
    }
}
